<template>
  <div>BComponent</div>
  <p>{{ count }}</p>
  <button @click="increment">+</button>
</template>

<script lang="ts">
export default {
  name: "BComponent",
};
</script>

<script lang="ts" setup>
import { computed } from "vue";
import { useStore } from "../../store";

const store = useStore();

const count = computed(() => store.state.counter.count);

const increment = () => store.dispatch("counter/increment", 1);
</script>

<style scoped></style>
